<%@page pageEncoding="UTF-8" contentType="text/html; charset=utf-8" errorPage="../error/errorpage.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language = "Java" import = "java.io.*" import="java.util.*"%>
<%@ page import="beans.BeanLoginAdmin"%>

<jsp:useBean id="mybean" class="beans.BeanLoginAdmin"/>
	<%
		mybean.conectar();
		String user = request.getParameter("adminuser");
		String pass = request.getParameter("adminpassw");
		if(!user.contains("@gmail.com"))
			user+="@gmail.com";
		mybean.validarAdmin(user, pass);
		String nomusuario = mybean.getNombreAdmin();
		//System.out.println("(((NOMBRE ADMIN:" + nomusuario  + ")))");
		mybean.desconectar();
		session.setAttribute("usuario", user);
		session.setAttribute("nombre_usuario", mybean.getNombreAdmin());
		session.setAttribute("es_admin", new Integer(1));
	%>
	